![]() |
Documentation for Users
2.0.2
Perception Toolbox for Virtual Reality (PTVR) Manual
|
General Goal : you want to create and place an object whose position is defined by its 3 cartesian coordinates (x, y, z) in the GLOBAL coordinate system (aka World coordinate system).
Specific Goal : You want to create and place a small sphere at the position of pink point P (x=0.25, y=0.20, z=0.30) as represented in figure 1 (PTVR coordinates are defined in meters by default).
PTVR code 1: function to create an object at a specific position in global coordinates
![]() | ![]() |
Figure 1: Creation of the pink point P with Global coordinates. | Figure 2: Same as in figure 1 with a horizontal rotation about Y to allow a better representation of the 3D structure of the figure. |
If you don't like the use of an array containing the three x, y and z coordinates (PTVR code 1), you can first create the object (here a sphere) and then specify its position as shown below:
PTVR code 2:
Python file | Description |
---|---|
...\PTVR_Researchers\Python_Scripts\Demos\Positions\ 1.0_create_object_in_cartesian_coord.py | create a cube in front of you : its coordinates are specified with cartesian coordinates in the Global coordinate system |
...\PTVR_Researchers\Python_Scripts\Demos\Coordinate_Systems\ 10_global_cartesian_coordinate_system.py | Displays the Global coordinate system with its colored axes (red X, green Y, blue Z).
|
Figure 3